1. Field of the Invention
The present invention relates to a technique for rewriting firmware which is stored in a memory. To be more specific, the present invention is applicable to an image forming apparatus in which a main controller is connected for mutual communications with an engine controller which comprises a rewritable memory which stores firmware. The present invention is applicable also to an information processing system in which a host apparatus is connected for mutual communications with an image forming apparatus which comprises a rewritable memory which stores firmware. Further, the present invention is applicable to a rewriting method, a rewriting program and a recording medium for rewriting firmware which is stored in a memory of an engine controller or the like which is disposed in an image forming apparatus.
2. Description of the Related Art
Known as an image forming apparatus such as a printer, a copier machine and a facsimile machine is an apparatus in which two controllers are connected for mutual communications with each other via a communications interface as described in Japanese Patent Application Laid-Open Gazette No. H8-161231. In this image forming apparatus, when provided with an image signal from an external apparatus such as a host computer, a built-in scanner or the like, a main controller analyzes the image signal, performs various types of image processing, and then supplies the resulting image-processed signal (which may be an image signal for instance) to an engine controller. The engine controller comprises a CPU which serves as a central processor and a rewritable non-volatile memory which stores firmware. Receiving the signal mentioned above, based on the firmware which is stored in the non-volatile memory such as a flash ROM and an EEPROM, the engine controller controls an engine of the apparatus. Hence, an image corresponding to the image signal is formed on a sheet such as a copy paper, a transfer paper, other general paper, a transparent sheet for an overhead projector, etc.
The reason the firmware is stored in the rewritable non-volatile memory in the example described above is to flexibly deal with addition of a function, upgrading or the like in the future. In other words, when it becomes necessary to add a function or implement upgrading, firmware containing addition of a function or the like is newly generated, and the new firmware is written over and replaces the old firmware.
By the way, in the conventional apparatus described above, for the purpose of allowing two controllers to communicate with each other, the conventional apparatus has the main controller function as a master and the engine controller function as a slave. That is, the engine controller operates in response to a command, data or the like from the main controller. When provided with an image-processed signal from the main controller, the engine controller executes a print mode which is for forming an image corresponding to this signal based on the firmware. Meanwhile, when it becomes necessary to rewrite the firmware, the engine controller enters a rewrite mode which is for rewriting the firmware in accordance with a command from the main controller. In the rewrite mode, the engine controller accesses the non-volatile memory and controls rewriting of the firmware.
However, as described above, since the engine controller is instructed or controlled by the main controller, the engine controller must execute rewriting of the firmware while always responding to a command or the like received from the main controller. Because of this, the rewriting of the firmware is not always efficient.
Further, such a problem does not occur only with the conventional apparatus described above but commonly arises also in the following information processing system. Known as this type of information processing system is a system in which a host apparatus such as a host computer is connected for mutual communications with a printer which serves as an image forming apparatus as described in Japanese Patent Application Laid-Open Gazette No. 2000-172453. The image forming apparatus described in this gazette comprises only a minimum mechanism needed as a printer, i.e., typically a function for receiving bitmapped image data from the host apparatus and simply printing the data. The image forming apparatus is therefore generally referred to as a dumb printer or a host-based printer. In short, this image forming apparatus comprises a CPU which serves as a central processor and a rewritable non-volatile memory which stores firmware. The image forming apparatus, when receiving a signal which is indicative of the image data mentioned above, controls an engine based on firmware which is stored in the non-volatile memory such as a flash ROM and an EEPROM. Hence, an image corresponding to the image data is formed on a sheet such as a copy paper, a transfer paper, other general paper, a transparent sheet for an overhead projector, etc.
In the information processing system described above, therefore, the host apparatus functions as a master while the image forming apparatus functions as a slave so that the host apparatus and the image forming apparatus can communicate with each other. In other words, the image forming apparatus operates in response to a command, data or the like from the host apparatus. When provided with a signal which is indicative of image data from the host apparatus, the image forming apparatus executes a print mode which is for forming an image which corresponds to this signal based on the firmware. Meanwhile, when it becomes necessary to rewrite the firmware, the image forming apparatus enters a rewrite mode which is for rewriting the firmware in accordance with a command from the host apparatus. In the rewrite mode, the image forming apparatus accesses the non-volatile memory and controls rewriting of the firmware.
However, since the image forming apparatus is instructed or controlled by the host apparatus as described above, the image forming apparatus must execute rewriting of the firmware while always responding to a command or the like received from the host apparatus. Because of this, the rewriting of the firmware is not always efficient.
By the way, in the conventional apparatus described above, for the purpose of allowing the two controllers to communicate with each other, the conventional apparatus has the main controller function as a master and the engine controller function as a slave. The engine controller is instructed or controlled by the main controller. That is, a plurality types of commands are prepared in the main controller in advance, and the main controller sends the engine controller a command, data or the like which corresponds to the operating state of the apparatus. The engine controller then executes processing which corresponds to the received command or the like, e.g., a printing operation for forming an image which corresponds to an image signal based on firmware (print mode) or a rewriting operation for rewriting the firmware (rewrite mode).
As described above, in the case of the conventional apparatus, it is necessary that the engine controller judges the content of a command, controls respective portions of the apparatus in accordance with the judgment and returns statuses or the like which are indicative of the conditions of the respective portions of the apparatus. Over the recent years in particular, as functions of the apparatus have become highly advanced and complex, there are now more types of commands which are transmitted from the main controller and the contents of statuses to be returned back to the main controller are more complex. Hence, even when one wishes to execute a rewrite mode in which merely limited processing of rewriting firmware is performed, it is necessary that the engine controller is structured so as to respond to all commands which are sent from the main controller. In other words, whatever command is transmitted from the main controller, the engine controller needs judge the content of the command and return a status corresponding to the command even if the command is irrelevant to the rewrite mode. Thus, rewriting of firmware is not always efficient in a conventional image forming apparatus.
Such a problem does not occur only with an image forming apparatus in which two controllers are connected for mutual communications with each other via a communications interface. As described in Japanese Patent Application Laid-Open Gazette No. 2000-172453, this problem arises also in an information processing system in which a host apparatus such as a host computer is connected for mutual communications with a printer which serves as an image forming apparatus.
Further, a rewrite error could occur in firmware during rewriting of the firmware in a manner as that described above. For example, in a conventional apparatus, new firmware is rewritten in a non-volatile memory disposed within an engine controller via a communications interface. In such an apparatus, it is possible that transmission of normal data to the engine controller will fail because of a communications error. A write error could further occur during writing of data in the non-volatile memory. If the print mode is continuously executed despite such a rewrite error, a malfunction or incapability of printing will occur. To avoid a firmware-induced operation failure, an appropriate countermeasure is therefore needed.